﻿#pragma once

void print_mat2d(cv::Mat outmat, std::string fname, std::string delimiter);

void print_snake(cv::Mat snake, std::string delimiter, std::ostream& pipe=std::cout);
void print_snake(cv::Mat snake, std::string delimiter, std::string fname);

void fix_snake(cv::Mat& inmat, int numpts);

void zero_mat2d(cv::Mat& inmat, double precision);


int draw_flow_image(cv::Mat& vx, cv::Mat& vy, cv::Mat& pic,
                    CvScalar back_color, CvScalar fore_color, float thresh);


//lightweight class to pass image data into thread
class imgData {
public:
	imgData(std::string a, cv::Mat b) : winName(a) {
		imgsrc = b.clone();
		//*imgsrc = b.clone();
	}
	~imgData() {
	}
	std::string winName;
	//cv::Mat* img;
	cv::Mat imgsrc;
};

int __stdcall dispImg(imgData* data);
